ages = {
    #键key:值value
    "张三":18,
    "李四":23,
    "rose":19,
    "tom":24
}

#直接便利
for key in ages:
    print(key,ages[key])
    
#获取所有key
for key in ages.keys(): #格式dict_keys
    print(key)
    
#获取所有valus
for valus in ages.values():
    print(valus)
    
#获取所有键值对
for item in ages.items(): #得到元组
    print(item,type(item))
    
for key,valus in ages.items():
    print(key,valus)  #解包
    
"""ss=set{} #空集合
ss=dict{} #空字典
ss={}    #默认为字典"""
